<?php
// +----------------------------------------------------------------------
// |
// +----------------------------------------------------------------------
// |
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// |
// +----------------------------------------------------------------------

namespace app\model;

use \think\Model;

class GoodsFree extends Model
{
    protected $name = 'goods_free';
    protected $autoWriteTimestamp = false;
    protected $insert = [];
    protected $update = [];

    public function goods()
    {
        return $this->belongsTo(Goods::class, 'goods_id')
            ->bind([
                'title'      => 'title',
                'image'      => 'image',
                'sale_price' => 'sale_price',
                'stock_num'  => 'stock_num',
            ]);
    }
}
